1. Field of the Invention
Methods and apparatuses consistent with the present invention relate to encoding and decoding based on intra prediction, and more particularly, to increasing a compression rate of intra prediction encoding by dividing a current block, that is to be encoded, into various forms of sub blocks and then intra prediction encoding the current block.
2. Description of the Related Art
In related art methods of compressing an image, such as MPEG-1, MPEG-2, and MPEG-4H.264/MPEG-4 Advanced Video Coding (AVC), a picture is divided into macro blocks in order to encode an image. Then, each macro block is encoded using inter prediction and intra prediction. Next, the macro blocks are encoded after selecting a suitable encoding mode by considering data size of the encoded macro block and distortion of the original macro block.
In intra prediction, a macro block of a current picture is encoded using pixel values spatially adjacent to the current block that is to be encoded, instead of using a reference picture. First, a prediction value of the current block that is to be encoded is calculated using the adjacent pixel values. Then, a difference between the prediction value and a pixel value of the original current block is encoded. The intra prediction modes can be largely divided into an intra prediction mode in luminance components and an intra prediction mode in chrominance components. The intra prediction mode in luminance components is divided into 4×4 intra prediction mode, 8×8 intra prediction mode, and 16×16 intra prediction mode.
FIGS. 1A through 1C illustrate block structures of related art intra prediction modes. FIG. 1A illustrates a unit block of a 16×16 intra prediction mode, FIG. 1B illustrates unit blocks of an 8×8 intra prediction mode, and FIG. 1C illustrates unit blocks of a 4×4 intra prediction mode.
A related art apparatus for encoding based on intra prediction performs intra prediction in 16×16, 8×8, and 4×4 intra prediction modes, and selects the optimum intra prediction mode from among the three intra prediction modes.
While performing intra prediction, an intra prediction direction of each unit block is determined, a prediction block is obtained according to the intra prediction direction, and then residue, in which the prediction block is subtracted from the original block, is encoded. The residue is discrete cosine transformed and then quantized in order to generate a bit stream. Information about the intra prediction direction of each unit block is inserted into the bit stream.
The optimum intra prediction mode is selected from the intra prediction modes illustrated in FIGS. 1A through 1C by considering residue and distortion. Criteria of the selection may differ according to types of data that is to be encoded and encoding apparatuses.
FIG. 2 illustrates in detail a related art 8×8 intra prediction mode.
In FIG. 2, a conventional apparatus for encoding based on intra prediction selects the 8×8 intra prediction mode illustrated in FIG. 1B for a current block, and determines an intra prediction direction of each unit block.
An intra prediction direction of two unit blocks 21 and 22 on the left is from top to bottom, and an intra prediction direction of two unit blocks 23 and 24 are from left to right.
Accordingly, when the apparatus intra prediction encodes the current block, information about the intra prediction directions of the four unit blocks 21 through 24 should be included.
Despite the fact that the intra prediction directions of the two unit blocks 21 and 22 on the left are equal and the intra prediction directions of the two unit blocks 23 and 24 on the right are equal, information about an intra prediction mode is repeatedly inserted in a bit stream because intra prediction encoding is performed based on an 8×8 block as a standard unit of intra prediction.
Accordingly, a method and apparatus for encoding based on intra prediction, which can increase a compression rate of intra prediction encoding by using a similarity between adjacent unit blocks, as illustrated in FIG. 2, are needed.